<%# NOTE: Since this call can be called from outside decidim-accountability, frontend assets are required %>
<%= apply_accountability_pack_tags %>

<div class="content-block__title">
  <h2 class="h2 decorator">
    <%= single_component? ? decidim_escape_translated(model.name) : t("decidim.accountability.content_blocks.highlighted_results.results") %>
  </h2>
  <div class="label text-lg"><%= results_count %></div>
  <% if single_component? %>
    <%= link_to main_component_path(model), class: "button button__sm button__text-secondary" do %>
      <span><%= t("decidim.participatory_spaces.highlighted_results.see_all") %></span>
      <%= icon "arrow-right-line" %>
    <% end %>
  <% end %>
</div>

<div>
  <% results_to_render.each do |result| %>
    <%= cell "decidim/accountability/result_l", result, title_tag: :h3, **options.slice(:show_space) %>
  <% end %>
</div>
